Replace Gemini CLI support with Antigravity CLI - #30
Conversation
Google deprecated Gemini CLI in favor of Antigravity CLI (June 2026). This migrates the plugin to the new platform: renamed manifests (plugin.json, ANTIGRAVITY.md, hooks/antigravity-hooks.json), unified PreToolUse hook event, .agents/ settings directory, and updated install commands (agy plugin install). Version bumped to 1.7.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Antigravity CLI inherits Gemini's variable names: ${extensionPath} for
hook commands (not ${pluginPath}) and GEMINI_PROJECT_DIR for the project
directory env var. Also corrects hooks copy instruction — agy plugin
install auto-discovers hooks.json at the plugin root.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts: keep Antigravity naming while incorporating the new X-Spotify-Ads-Skill header from main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| @@ -0,0 +1,16 @@ | |||
| { | |||
There was a problem hiding this comment.
[P1] Antigravity only discovers a hook configuration named hooks.json at the plugin root. This file is instead committed as hooks/antigravity-hooks.json, and the PR never creates the required root file. Therefore agy plugin install cannot auto-discover the hook as the documentation claims. Move or copy this configuration to /hooks.json as part of the plugin package; do not rely on a manual post-install step.
There was a problem hiding this comment.
[P1] Antigravity supplies PreToolUse commands at .toolCall.args.CommandLine, not under .tool_input.command, .input.command, or their cmd variants. The command extraction around line 62 therefore returns an empty string for every Antigravity run_command, and the following guard exits before refreshing the token. Parse .toolCall.args.CommandLine on Antigravity.
There was a problem hiding this comment.
This was actually already handled — the jq expression at line 65-72 includes .toolCall.args.CommandLine and .toolCall.args.command in the fallback chain (via //). It tries Claude/Codex paths first and falls through to the Antigravity paths. Additionally, the fast-path check on line 23 matches api-partner.spotify.com anywhere in the raw stdin JSON, so the hook fires correctly regardless of which field contains the command.
Address review feedback: - Use documented PreToolUse output schema (decision/reason) instead of made-up allow_tool/systemMessage fields - Move hooks.json to plugin root for auto-discovery by both Antigravity CLI and Antigravity 2.0 - Remove redundant hooks/antigravity-hooks.json - Update docs to reference both Antigravity CLI and 2.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Re: hooks/antigravity-hooks.json discovery — fixed in 253085b. |
Summary
gemini-extension.json→plugin.json,GEMINI.md→ANTIGRAVITY.md,hooks/gemini-hooks.json→hooks/antigravity-hooks.jsonPreToolUseacross all three platforms (wasBeforeToolon Gemini), matcher torun_command, and uses Antigravity's named-group hook format.gemini/to.agents/; SDK header fromgemini-cli-extensiontoantigravity-cli-plugincheck-token.sh— all platforms now use the samepermissionDecision/updatedInputoutput formatContext: Google deprecated Gemini CLI in favor of Antigravity CLI as of June 18, 2026.
Test plan
agy plugin installand verify skills load (/skills list)/configureon Antigravity CLI and complete OAuth flowhooks/antigravity-hooks.jsonto.agents/hooks.json)geminireferences outside CHANGELOG.md historical entries🤖 Generated with Claude Code